package com.crh.controller;

import com.crh.bean.Users;
import com.crh.service.UserService;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Chrui
 * @date 2018/10/24__14:50
 */
@Controller
@RequestMapping("/admin")
public class MyController {
    @Resource
    private UserService userService;

    @RequestMapping(value = "demo.action")
    public PageInfo<Users> demo() throws Exception {
        Map<String, Object> userData = new HashMap<>();
        userData.put("begintime", "");
        userData.put("endtime", "");
        PageInfo<Users> usersPageInfo = userService.queryAllUserList(userData, 1, 5);
        return usersPageInfo;
    }
}
